import time
import os
import pyautogui



def check_mouse_movement(timeout_seconds):
    start_time = time.time()
    while True:
        current_pos = pyautogui.position()
        time.sleep(1)
        if pyautogui.position() != current_pos:
            start_time = time.time()
        if time.time() - start_time > timeout_seconds:
            return True

if __name__ == "__main__":
    while True:
        if check_mouse_movement(120):
            os.system("python3 ./5.py")
